import request from '@/utils/request'

// 查询排班计划列表
export function listSche(query) {
  return request({
    url: '/group/sche/list',
    method: 'get',
    params: query
  })
}

// 查询排班计划列表(分页)
export function pageSche(query) {
  return request({
    url: '/group/sche/page',
    method: 'get',
    params: query
  })
}

// 查询排班计划详细
export function getSche(scheId) {
  return request({
    url: '/group/sche/get/' + scheId,
    method: 'get'
  })
}

// 新增排班计划
export function addSche(data) {
  return request({
    url: '/group/sche/add',
    method: 'post',
    data: data
  })
}

// 修改排班计划
export function updateSche(data) {
  return request({
    url: '/group/sche/edit',
    method: 'post',
    data: data
  })
}

// 删除排班计划
export function delSche(scheId) {
  return request({
    url: '/group/sche/remove/' + scheId,
    method: 'post'
  })
}

export function batchDaySche(data) {
  return request({
    url: '/group/sche/batchDaySche',
    method: 'post',
    data: data
  })
}

export function setAutoSche(data) {
  return request({
    url: '/group/sche/setAutoSche',
    method: 'post',
    data: data
  })
}

export function getAutoSche() {
  return request({
    url: '/group/sche/getAutoSche',
    method: 'get'
  })
}


export function getLastSche() {
  return request({
    url: '/group/sche/getLastSche',
    method: 'get'
  })
}
